package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysHouseholdMapper;
import com.ruoyi.system.domain.SysHousehold;
import com.ruoyi.system.service.ISysHouseholdService;

/**
 * 住户Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-15
 */
@Service
public class SysHouseholdServiceImpl implements ISysHouseholdService 
{
    @Autowired
    private SysHouseholdMapper sysHouseholdMapper;

    /**
     * 查询住户
     * 
     * @param id 住户主键
     * @return 住户
     */
    @Override
    public SysHousehold selectSysHouseholdById(Long id)
    {
        return sysHouseholdMapper.selectSysHouseholdById(id);
    }

    /**
     * 查询住户列表
     * 
     * @param sysHousehold 住户
     * @return 住户
     */
    @Override
    public List<SysHousehold> selectSysHouseholdList(SysHousehold sysHousehold)
    {
        return sysHouseholdMapper.selectSysHouseholdList(sysHousehold);
    }

    /**
     * 新增住户
     * 
     * @param sysHousehold 住户
     * @return 结果
     */
    @Override
    public int insertSysHousehold(SysHousehold sysHousehold)
    {
        return sysHouseholdMapper.insertSysHousehold(sysHousehold);
    }

    /**
     * 修改住户
     * 
     * @param sysHousehold 住户
     * @return 结果
     */
    @Override
    public int updateSysHousehold(SysHousehold sysHousehold)
    {
        return sysHouseholdMapper.updateSysHousehold(sysHousehold);
    }

    /**
     * 批量删除住户
     * 
     * @param ids 需要删除的住户主键
     * @return 结果
     */
    @Override
    public int deleteSysHouseholdByIds(Long[] ids)
    {
        return sysHouseholdMapper.deleteSysHouseholdByIds(ids);
    }

    /**
     * 删除住户信息
     * 
     * @param id 住户主键
     * @return 结果
     */
    @Override
    public int deleteSysHouseholdById(Long id)
    {
        return sysHouseholdMapper.deleteSysHouseholdById(id);
    }
}
